package net.xiduth.game.npc.combat.impl;

import net.xiduth.game.Animation;
import net.xiduth.game.Entity;
import net.xiduth.game.Graphics;
import net.xiduth.game.World;
import net.xiduth.game.npc.NPC;
import net.xiduth.game.npc.combat.CombatScript;
import net.xiduth.game.npc.combat.NPCCombatDefinitions;
import net.xiduth.utils.Utils;

/**
 * 
 * @author Jae <jae@xiduth.com>
 * 
 * Last modified: <Oct 27, 2013>
 *
 */
public class PhoenixCombat extends CombatScript {
	
	@Override 
	public Object[] getKeys() {
		return new Object[] { 8549 };
	}
	
	@Override
	public int attack(final NPC npc, final Entity target) {
		final NPCCombatDefinitions defs = npc.getCombatDefinitions();
		
		npc.setNextGraphics(new Graphics(2728));
		
		World.sendProjectile(npc,
								target,
										2735, 40, 40, 50, 50, 0, 0);
		delayHit(npc,
				14,
					target,
						getMagicHit(npc, Utils.random(555)));
		target.setNextGraphics(new Graphics(2739, 100, 100));
		
				return defs.getAttackDelay();

	}

}
